class_name Afterimage
extends Sprite2D


@onready var amt_player: AnimationPlayer = $"AnimationPlayer"


func setup(texture_: Texture2D, pos: Vector2, flip_h_: bool, flip_v_: bool, 
            frames: Vector2i, frame_: int, region_enabled_: bool, region_rect_: Rect2) -> void:
    texture = texture_
    global_position = pos
    flip_h = flip_h_
    flip_v = flip_v_
    hframes = frames.x
    vframes = frames.y
    frame = frame_
    region_enabled = region_enabled_
    region_rect = region_rect_
    amt_player.play("default")